---------------------------------------------------------------------------
STIMULUS/RESPONSE APPLICATION NOTES FOR KEITHLEY KPCI-3108 SERIES DAQ CARD
---------------------------------------------------------------------------

INTRODUCTION

	This archive contains a complete working application designed for a
Keithley KPCI-3108 or DAS-1800AO card (i.e., DAS-1801AO or DAS-1802AO) using 
Visual BASIC 6, Excel 97, and DriverLINX.  
	The code and associated files provided here are not supported by 
Keithley Instruments.  They are intended for use as reference and as a 
development tool.
	This application was developed on Windows NT 4.0, Service Pack 4 
operating system.  Visual BASIC 6.0 and Excel 97 were used for the source
code development.  The program may not work in other environments. 

FILE LIST

dlcodes.bas		Contains DriverLINX error and result codes.
dlvblib.bas		Contains high level DriverLINX VB functions.
drvlnxvb.bas		Contains other DriverLINX constants.
excel8.olb		Excel8 Object library (for workbooks).
excelinterface.bas	Source code for the routines which talk to Excel.
graph8.olb		Excel8 Object library (for graphs).
layout.xls		Workbook used by StimResp to save and analyze data.
			Copy this file to c:\.
readme.txt		This file.
stimresp.exe		Pre-compiled version of the application.
stimresp.frm		The form of the application.
stimresp.vbp		VB Project file.  Open this when loading the code
			from within VB.
waveanalysis.bas	Source code for functions which analyze the wave data.

OTHER NOTES

- layout.xls (or its equivalent) MUST NOT have either of the Analysis Toolpak
  add-ins statically linked.  That is, they cannot be part of the checked from 
  within the file.  StimResp.exe will automatically link them dynamically at run time.

- Remember that MS Excel's FFT algorithm can only handle 4096 samples maximum.

- This code should require mininimal revision for any other kind of Keithley AO/AI 
  card.

- Code was developed with VB6 and MS Excel 8.  Many function calls will not work with
  Excel 95 and other older versions.  Not only must Excel 98 be installed, but it must
  be correctly registered with your system.  Included in this archive are the Excel
  workbook and graph object libraries, in case they are needed.  If you run into a 
  problem with Excel being loaded incorrectly by the application, try reinstalling
  MS Excel.

- Error trapping in the code is minimal, for simplicity's sake.  

- DriverLINX's device number is stored as a C unsigned int (i.e., between
  0 and 65535).  Visual BASIC's only integer is signed, between -32768 and 32767. Thus
  this program may not be used with a logical device of number greater than 32767.
  This is a limitation inherent when programming with VB.

- Sometimes when Excel is opened from the OLE window, it doesn't display the worksheet
  properly.  One fix for this is to perform View -> Full Screen (it then displays the
  worksheet okay), then do the same thing once more to return it to normal size.  This is
  a problem with Excel.

- If you ever receive a message like "Module ATPVBAEN.XLA not found. . .", simply 
  uninstall, then reinstall the Analysis Toolpak and Analysis Toolpak - VBA in 
  layout.xls.  Microsoft Excel is buggy and sometimes will bind a file to the AddIns, 
  even if you did not save the file from within Excel.  

- Due to the Sample and Hold characteristics of the AI channel, and the fact that in 
  a Stimulus/Response app, the AO and AI both respond to the same pacer clock, the AI
  will always be a sample behind the AO.  For high sampling rates, this doesn't effect
  much.  But this effect does cause phase shift to always be off by at least a sample. 
  This was corrected by adding a sample to the phase calculation function.

- Error in the phase measurement is very likely, especially for low sampling rates.

- This form was designed for screen resolutions of 1024x768 or more.  If your screen 
  resolution is 800x600 or less, you will have to modify the form within VB to account
  for this.